import msnp
import time

class MsnListener(msnp.SessionCallbacks):
    def state_changed(self, state):
        if state == msnp.States.ONLINE:
            print 'You are now online.'

msn = msnp.Session(MsnListener())
msn.login('netbigzb@hotmail.com', '19830906')

while True:
    msn.process()
    time.sleep(1)
